<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition template="template.xhtml">
	<ui:define name="corpo">
		<h:panelGroup rendered="#{usuarioMB.usuarioLogado eq null}">
			<h:messages globalOnly="true" />
        	#{msg.login}: <h:inputText id="inputLogin" required="true" value="#{usuarioMB.login}" validator="validadorCampoEmail" />
			<h:message for="inputLogin" />
			<br />
			#{msg.senha}: <h:inputSecret id="inputSenha" required="true" validator="validadorSenha" value="#{usuarioMB.senha}" />
			<h:message for="inputSenha" />
		</h:panelGroup>
		<h1>#{msg.total}: #{carrinhoMB.total}</h1>
		<h:commandButton styleClass="btn btn-large btn-primary" action="#{compraMB.comprar}" value="#{msg.comprar}"/>
	</ui:define>
</ui:composition>
</html>